package cn.wolfcode.car.shiro.Interceptor;

import cn.wolfcode.car.common.exception.BaseException;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Component
public class YxInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        if ("0:0:0:0:0:0:0:1".equals(request.getRemoteAddr())){
            return true;
        }
            throw new BaseException(" 拦截狗贼亚兴");

    }
}
